	.file	1 "tp0.c"
	.section .mdebug.abi32
	.previous
	.abicalls
	.data
	.align	2
	.type	octal_flag, @object
	.size	octal_flag, 4
octal_flag:
	.word	1
	.rdata
	.align	2
$LC0:
	.ascii	"octal\000"
	.align	2
$LC1:
	.ascii	"binary\000"
	.align	2
$LC2:
	.ascii	"input\000"
	.align	2
$LC3:
	.ascii	"output\000"
	.align	2
$LC4:
	.ascii	"length\000"
	.align	2
$LC5:
	.ascii	"delimiter\000"
	.align	2
$LC6:
	.ascii	"help\000"
	.align	2
$LC7:
	.ascii	"version\000"
	.data
	.align	2
	.type	long_options, @object
	.size	long_options, 144
long_options:
	.word	$LC0
	.word	0
	.word	octal_flag
	.word	1
	.word	$LC1
	.word	0
	.word	octal_flag
	.word	0
	.word	$LC2
	.word	1
	.word	0
	.word	105
	.word	$LC3
	.word	1
	.word	0
	.word	111
	.word	$LC4
	.word	1
	.word	0
	.word	108
	.word	$LC5
	.word	1
	.word	0
	.word	100
	.word	$LC6
	.word	0
	.word	0
	.word	104
	.word	$LC7
	.word	0
	.word	0
	.word	118
	.word	0
	.word	0
	.word	0
	.word	0
	.globl	HELP
	.align	2
	.type	HELP, @object
	.size	HELP, 789
HELP:
	.ascii	"Usage:\n"
	.ascii	"\ttp0 -h\n"
	.ascii	"\ttp0 -V\n"
	.ascii	"\ttp0 [options]\n"
	.ascii	"Options:\n"
	.ascii	"\t-h,\t--help Print this information.\n"
	.ascii	"\t-V,\t--version Print version and quit.\n"
	.ascii	"\t-O,\t--octal Octal dump mode: encode the input (binary"
	.ascii	" file) in octal\n"
	.ascii	"\t\tformat (default).\n"
	.ascii	"\t-b,\t--binary Binary mode: decode the input (octal dum"
	.ascii	"p file) in binary\n"
	.ascii	"\t\tformat.\n"
	.ascii	"\t-i,\t--input Path to input file (defaults to stdin).\n"
	.ascii	"\t-o,\t--output Path to output file (defaults to stdout)"
	.ascii	".\n"
	.ascii	"\t-l, --length Number of octal bytes per line (line leng"
	.ascii	"th) at the\n"
	.ascii	"\t\toutput in octal dump mode (0 = default = no limit).\n"
	.ascii	"\t-d, --delimiter Delimiter between octal bytes. Could b"
	.ascii	"e a string, not only\n"
	.ascii	"\t\ta single byte. Used as delimiter for octal output an"
	.ascii	"d input\n"
	.ascii	"\t\tfiles (default: none).\n"
	.ascii	"Examples:\n"
	.ascii	"\ttp0\n"
	.ascii	"\ttp0 -i -\n"
	.ascii	"\ttp0 -i - -o - -O\n"
	.ascii	"\ttp0 -b\n"
	.ascii	"\ttp0 -i /dev/random -o /tmp/random-octaldump -l 12\n\000"
	.rdata
	.align	2
$LC8:
	.ascii	"%s\000"
	.text
	.align	2
	.globl	usage
	.ent	usage
usage:
	.frame	$fp,40,$ra		# vars= 0, regs= 3/0, args= 16, extra= 8
	.mask	0xd0000000,-8
	.fmask	0x00000000,0
	.set	noreorder
	.cpload	$t9
	.set	reorder
	subu	$sp,$sp,40
	.cprestore 16
	sw	$ra,32($sp)
	sw	$fp,28($sp)
	sw	$gp,24($sp)
	move	$fp,$sp
	la	$a0,$LC8
	la	$a1,HELP
	la	$t9,printf
	jal	$ra,$t9
	move	$sp,$fp
	lw	$ra,32($sp)
	lw	$fp,28($sp)
	addu	$sp,$sp,40
	j	$ra
	.end	usage
	.size	usage, .-usage
	.rdata
	.align	2
$LC9:
	.ascii	"tp0 version 0.1\n\000"
	.text
	.align	2
	.globl	version
	.ent	version
version:
	.frame	$fp,40,$ra		# vars= 0, regs= 3/0, args= 16, extra= 8
	.mask	0xd0000000,-8
	.fmask	0x00000000,0
	.set	noreorder
	.cpload	$t9
	.set	reorder
	subu	$sp,$sp,40
	.cprestore 16
	sw	$ra,32($sp)
	sw	$fp,28($sp)
	sw	$gp,24($sp)
	move	$fp,$sp
	la	$a0,$LC9
	la	$t9,printf
	jal	$ra,$t9
	move	$sp,$fp
	lw	$ra,32($sp)
	lw	$fp,28($sp)
	addu	$sp,$sp,40
	j	$ra
	.end	version
	.size	version, .-version
	.align	2
	.globl	char2octal
	.ent	char2octal
char2octal:
	.frame	$fp,24,$ra		# vars= 8, regs= 2/0, args= 0, extra= 8
	.mask	0x50000000,-4
	.fmask	0x00000000,0
	.set	noreorder
	.cpload	$t9
	.set	reorder
	subu	$sp,$sp,24
	.cprestore 0
	sw	$fp,20($sp)
	sw	$gp,16($sp)
	move	$fp,$sp
	move	$v0,$a0
	sw	$a1,28($fp)
	sb	$v0,8($fp)
	lw	$v1,28($fp)
	lb	$v0,8($fp)
	andi	$v0,$v0,0xc0
	sra	$v0,$v0,6
	sb	$v0,0($v1)
	lw	$v0,28($fp)
	addu	$v1,$v0,1
	lbu	$v0,8($fp)
	andi	$v0,$v0,0x38
	sra	$v0,$v0,3
	sb	$v0,0($v1)
	lw	$v0,28($fp)
	addu	$v1,$v0,2
	lbu	$v0,8($fp)
	andi	$v0,$v0,0x7
	sb	$v0,0($v1)
	move	$sp,$fp
	lw	$fp,20($sp)
	addu	$sp,$sp,24
	j	$ra
	.end	char2octal
	.size	char2octal, .-char2octal
	.align	2
	.globl	octal2char
	.ent	octal2char
octal2char:
	.frame	$fp,56,$ra		# vars= 16, regs= 3/0, args= 16, extra= 8
	.mask	0xd0000000,-8
	.fmask	0x00000000,0
	.set	noreorder
	.cpload	$t9
	.set	reorder
	subu	$sp,$sp,56
	.cprestore 16
	sw	$ra,48($sp)
	sw	$fp,44($sp)
	sw	$gp,40($sp)
	move	$fp,$sp
	sw	$a0,56($fp)
	sw	$a1,60($fp)
	sb	$zero,28($fp)
	sb	$zero,33($fp)
	sw	$zero,24($fp)
$L21:
	lw	$v0,24($fp)
	slt	$v0,$v0,3
	bne	$v0,$zero,$L24
	b	$L22
$L24:
	lw	$v1,56($fp)
	lw	$v0,24($fp)
	addu	$v0,$v1,$v0
	lbu	$v0,0($v0)
	sb	$v0,32($fp)
	addu	$v0,$fp,32
	move	$a0,$v0
	la	$t9,atoi
	jal	$ra,$t9
	move	$a0,$v0
	li	$v1,2			# 0x2
	lw	$v0,24($fp)
	subu	$v1,$v1,$v0
	move	$v0,$v1
	sll	$v0,$v0,1
	addu	$v0,$v0,$v1
	sll	$v0,$a0,$v0
	lbu	$v1,28($fp)
	or	$v0,$v1,$v0
	sb	$v0,28($fp)
	lw	$v0,24($fp)
	addu	$v0,$v0,1
	sw	$v0,24($fp)
	b	$L21
$L22:
	lw	$v1,60($fp)
	lbu	$v0,28($fp)
	sb	$v0,0($v1)
	move	$sp,$fp
	lw	$ra,48($sp)
	lw	$fp,44($sp)
	addu	$sp,$sp,56
	j	$ra
	.end	octal2char
	.size	octal2char, .-octal2char
	.rdata
	.align	2
$LC10:
	.ascii	"%d\000"
	.align	2
$LC11:
	.ascii	"\n\000"
	.text
	.align	2
	.globl	to_octal
	.ent	to_octal
to_octal:
	.frame	$fp,64,$ra		# vars= 24, regs= 3/0, args= 16, extra= 8
	.mask	0xd0000000,-8
	.fmask	0x00000000,0
	.set	noreorder
	.cpload	$t9
	.set	reorder
	subu	$sp,$sp,64
	.cprestore 16
	sw	$ra,56($sp)
	sw	$fp,52($sp)
	sw	$gp,48($sp)
	move	$fp,$sp
	sw	$a0,64($fp)
	sw	$a1,68($fp)
	sw	$a2,72($fp)
	sw	$a3,76($fp)
	sw	$zero,32($fp)
	addu	$a0,$fp,24
	li	$a1,1			# 0x1
	li	$a2,1			# 0x1
	lw	$a3,64($fp)
	la	$t9,fread
	jal	$ra,$t9
$L26:
	lw	$v0,64($fp)
	lhu	$v0,12($v0)
	srl	$v0,$v0,5
	andi	$v0,$v0,0x1
	beq	$v0,$zero,$L28
	b	$L27
$L28:
	addu	$v0,$fp,40
	move	$a0,$v0
	move	$a1,$zero
	li	$a2,3			# 0x3
	la	$t9,memset
	jal	$ra,$t9
	lb	$v0,24($fp)
	addu	$v1,$fp,40
	move	$a0,$v0
	move	$a1,$v1
	la	$t9,char2octal
	jal	$ra,$t9
	sw	$zero,28($fp)
$L29:
	lw	$v0,28($fp)
	slt	$v0,$v0,3
	bne	$v0,$zero,$L32
	b	$L30
$L32:
	addu	$v1,$fp,40
	lw	$v0,28($fp)
	addu	$v0,$v1,$v0
	lbu	$v0,0($v0)
	lw	$a0,68($fp)
	la	$a1,$LC10
	move	$a2,$v0
	la	$t9,fprintf
	jal	$ra,$t9
	lw	$v0,28($fp)
	addu	$v0,$v0,1
	sw	$v0,28($fp)
	b	$L29
$L30:
	lw	$v0,32($fp)
	addu	$v0,$v0,1
	sw	$v0,32($fp)
	addu	$a0,$fp,24
	li	$a1,1			# 0x1
	li	$a2,1			# 0x1
	lw	$a3,64($fp)
	la	$t9,fread
	jal	$ra,$t9
	lw	$v0,72($fp)
	blez	$v0,$L33
	lw	$v1,32($fp)
	lw	$v0,72($fp)
	bne	$v1,$v0,$L33
	lw	$a0,68($fp)
	la	$a1,$LC11
	la	$t9,fprintf
	jal	$ra,$t9
	sw	$zero,32($fp)
	b	$L26
$L33:
	lw	$v0,64($fp)
	lhu	$v0,12($v0)
	srl	$v0,$v0,5
	andi	$v0,$v0,0x1
	bne	$v0,$zero,$L26
	lw	$a0,68($fp)
	la	$a1,$LC8
	lw	$a2,76($fp)
	la	$t9,fprintf
	jal	$ra,$t9
	b	$L26
$L27:
	move	$v0,$zero
	move	$sp,$fp
	lw	$ra,56($sp)
	lw	$fp,52($sp)
	addu	$sp,$sp,64
	j	$ra
	.end	to_octal
	.size	to_octal, .-to_octal
	.rdata
	.align	2
$LC12:
	.ascii	"%s (%x != %x)\n\000"
	.align	2
$LC13:
	.ascii	"Error al parsear el delimitador\000"
	.text
	.align	2
	.globl	to_bin
	.ent	to_bin
to_bin:
	.frame	$fp,80,$ra		# vars= 32, regs= 3/0, args= 24, extra= 8
	.mask	0xd0000000,-8
	.fmask	0x00000000,0
	.set	noreorder
	.cpload	$t9
	.set	reorder
	subu	$sp,$sp,80
	.cprestore 24
	sw	$ra,72($sp)
	sw	$fp,68($sp)
	sw	$gp,64($sp)
	move	$fp,$sp
	sw	$a0,80($fp)
	sw	$a1,84($fp)
	sw	$a2,88($fp)
	sw	$a3,92($fp)
	sw	$zero,36($fp)
	lw	$a0,92($fp)
	la	$t9,strlen
	jal	$ra,$t9
	sw	$v0,48($fp)
	lw	$a0,48($fp)
	la	$t9,malloc
	jal	$ra,$t9
	sw	$v0,52($fp)
	lw	$v0,52($fp)
	sb	$zero,0($v0)
	addu	$v0,$fp,40
	move	$a0,$v0
	li	$a1,3			# 0x3
	li	$a2,1			# 0x1
	lw	$a3,80($fp)
	la	$t9,fread
	jal	$ra,$t9
$L37:
	lw	$v0,80($fp)
	lhu	$v0,12($v0)
	srl	$v0,$v0,5
	andi	$v0,$v0,0x1
	beq	$v0,$zero,$L39
	b	$L38
$L39:
	addu	$v0,$fp,40
	move	$a0,$v0
	addu	$a1,$fp,32
	la	$t9,octal2char
	jal	$ra,$t9
	lbu	$v0,32($fp)
	move	$a0,$v0
	lw	$a1,84($fp)
	la	$t9,fputc
	jal	$ra,$t9
	lw	$v0,36($fp)
	addu	$v0,$v0,1
	sw	$v0,36($fp)
	lw	$v1,88($fp)
	lw	$v0,36($fp)
	bne	$v1,$v0,$L40
	sw	$zero,36($fp)
	addu	$v0,$fp,40
	move	$a0,$v0
	li	$a1,1			# 0x1
	li	$a2,1			# 0x1
	lw	$a3,80($fp)
	la	$t9,fread
	jal	$ra,$t9
	addu	$v0,$fp,40
	move	$a0,$v0
	li	$a1,3			# 0x3
	li	$a2,1			# 0x1
	lw	$a3,80($fp)
	la	$t9,fread
	jal	$ra,$t9
	b	$L37
$L40:
	lw	$a0,52($fp)
	lw	$a1,48($fp)
	li	$a2,1			# 0x1
	lw	$a3,80($fp)
	la	$t9,fread
	jal	$ra,$t9
	addu	$v0,$fp,40
	move	$a0,$v0
	li	$a1,3			# 0x3
	li	$a2,1			# 0x1
	lw	$a3,80($fp)
	la	$t9,fread
	jal	$ra,$t9
	lw	$a0,52($fp)
	lw	$a1,92($fp)
	la	$t9,strcmp
	jal	$ra,$t9
	beq	$v0,$zero,$L37
	lw	$v0,80($fp)
	lhu	$v0,12($v0)
	srl	$v0,$v0,5
	andi	$v0,$v0,0x1
	bne	$v0,$zero,$L37
	lw	$v0,52($fp)
	lb	$v1,0($v0)
	lw	$v0,92($fp)
	lb	$v0,0($v0)
	sw	$v0,16($sp)
	la	$a0,__sF+176
	la	$a1,$LC12
	la	$a2,$LC13
	move	$a3,$v1
	la	$t9,fprintf
	jal	$ra,$t9
	lw	$a0,52($fp)
	la	$t9,free
	jal	$ra,$t9
	li	$v0,1			# 0x1
	sw	$v0,56($fp)
	b	$L36
$L38:
	sw	$zero,56($fp)
$L36:
	lw	$v0,56($fp)
	move	$sp,$fp
	lw	$ra,72($sp)
	lw	$fp,68($sp)
	addu	$sp,$sp,80
	j	$ra
	.end	to_bin
	.size	to_bin, .-to_bin
	.rdata
	.align	2
$LC14:
	.ascii	"i:o:l:d:hvbO\000"
	.align	2
$LC15:
	.ascii	"-\000"
	.align	2
$LC16:
	.ascii	"r\000"
	.align	2
$LC17:
	.ascii	"w\000"
	.text
	.align	2
	.globl	main
	.ent	main
main:
	.frame	$fp,80,$ra		# vars= 32, regs= 3/0, args= 24, extra= 8
	.mask	0xd0000000,-8
	.fmask	0x00000000,0
	.set	noreorder
	.cpload	$t9
	.set	reorder
	subu	$sp,$sp,80
	.cprestore 24
	sw	$ra,72($sp)
	sw	$fp,68($sp)
	sw	$gp,64($sp)
	move	$fp,$sp
	sw	$a0,80($fp)
	sw	$a1,84($fp)
	sw	$zero,36($fp)
	la	$v0,__sF
	sw	$v0,40($fp)
	la	$v0,__sF+88
	sw	$v0,44($fp)
	li	$a0,1			# 0x1
	la	$t9,malloc
	jal	$ra,$t9
	sw	$v0,48($fp)
	sw	$zero,52($fp)
	sw	$zero,56($fp)
	lw	$v0,48($fp)
	sb	$zero,0($v0)
$L44:
	addu	$v0,$fp,56
	sw	$v0,16($sp)
	lw	$a0,80($fp)
	lw	$a1,84($fp)
	la	$a2,$LC14
	la	$a3,long_options
	la	$t9,getopt_long
	jal	$ra,$t9
	sw	$v0,32($fp)
	lw	$v1,32($fp)
	li	$v0,-1			# 0xffffffffffffffff
	bne	$v1,$v0,$L46
	b	$L45
$L46:
	lw	$v0,32($fp)
	addu	$v0,$v0,-79
	sw	$v0,60($fp)
	lw	$v1,60($fp)
	sltu	$v0,$v1,40
	beq	$v0,$zero,$L44
	lw	$v0,60($fp)
	sll	$v1,$v0,2
	la	$v0,$L58
	addu	$v0,$v1,$v0
	lw	$v0,0($v0)
	.cpadd	$v0
	j	$v0
	.rdata
	.align	2
$L58:
	.gpword	$L48
	.gpword	$L44
	.gpword	$L44
	.gpword	$L44
	.gpword	$L44
	.gpword	$L44
	.gpword	$L44
	.gpword	$L44
	.gpword	$L44
	.gpword	$L44
	.gpword	$L44
	.gpword	$L44
	.gpword	$L44
	.gpword	$L44
	.gpword	$L44
	.gpword	$L44
	.gpword	$L44
	.gpword	$L44
	.gpword	$L44
	.gpword	$L49
	.gpword	$L44
	.gpword	$L55
	.gpword	$L44
	.gpword	$L44
	.gpword	$L44
	.gpword	$L44
	.gpword	$L50
	.gpword	$L44
	.gpword	$L44
	.gpword	$L54
	.gpword	$L44
	.gpword	$L44
	.gpword	$L52
	.gpword	$L44
	.gpword	$L44
	.gpword	$L44
	.gpword	$L44
	.gpword	$L44
	.gpword	$L44
	.gpword	$L56
	.text
$L48:
	li	$v0,1			# 0x1
	sw	$v0,octal_flag
	b	$L44
$L49:
	sw	$zero,octal_flag
	b	$L44
$L50:
	lw	$a0,optarg
	la	$a1,$LC15
	la	$t9,strcmp
	jal	$ra,$t9
	beq	$v0,$zero,$L44
	lw	$a0,optarg
	la	$a1,$LC16
	la	$t9,fopen
	jal	$ra,$t9
	sw	$v0,40($fp)
	b	$L44
$L52:
	lw	$a0,optarg
	la	$a1,$LC15
	la	$t9,strcmp
	jal	$ra,$t9
	beq	$v0,$zero,$L44
	lw	$a0,optarg
	la	$a1,$LC17
	la	$t9,fopen
	jal	$ra,$t9
	sw	$v0,44($fp)
	b	$L44
$L54:
	lw	$a0,optarg
	la	$t9,atoi
	jal	$ra,$t9
	sw	$v0,52($fp)
	b	$L44
$L55:
	lw	$a0,48($fp)
	la	$t9,free
	jal	$ra,$t9
	lw	$a0,optarg
	la	$t9,strlen
	jal	$ra,$t9
	move	$a0,$v0
	la	$t9,malloc
	jal	$ra,$t9
	sw	$v0,48($fp)
	lw	$a0,optarg
	la	$t9,strlen
	jal	$ra,$t9
	lw	$a0,48($fp)
	lw	$a1,optarg
	move	$a2,$v0
	la	$t9,strncpy
	jal	$ra,$t9
	b	$L44
$L56:
	la	$t9,version
	jal	$ra,$t9
	b	$L44
$L45:
	lw	$v0,octal_flag
	beq	$v0,$zero,$L59
	lw	$a0,40($fp)
	lw	$a1,44($fp)
	lw	$a2,52($fp)
	lw	$a3,48($fp)
	la	$t9,to_octal
	jal	$ra,$t9
	sw	$v0,36($fp)
	b	$L60
$L59:
	lw	$a0,40($fp)
	lw	$a1,44($fp)
	lw	$a2,52($fp)
	lw	$a3,48($fp)
	la	$t9,to_bin
	jal	$ra,$t9
	sw	$v0,36($fp)
$L60:
	lw	$a0,48($fp)
	la	$t9,free
	jal	$ra,$t9
	lw	$a0,40($fp)
	la	$t9,fclose
	jal	$ra,$t9
	lw	$a0,44($fp)
	la	$t9,fclose
	jal	$ra,$t9
	lw	$v0,36($fp)
	move	$sp,$fp
	lw	$ra,72($sp)
	lw	$fp,68($sp)
	addu	$sp,$sp,80
	j	$ra
	.end	main
	.size	main, .-main
	.ident	"GCC: (GNU) 3.3.3 (NetBSD nb3 20040520)"
